home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / bbs / lord2b7.zip / QUEST.REF < prev    next >
Text File  |  1997-06-01  |  5KB  |  262 lines

  1. ;the random quest stuff is handled in this .ref.. it is fairly complicated
  2. ;so be carefull if you try to change it.. I'm going to be adding more
  3. ;later.
  4.  
  5. @#GETNAME
  6. @do `s01 is `bNo`xname?
  7. @if `p20 is 1 then `s01 is The`xBartender
  8. @if `p20 is 2 then `s01 is Smithy
  9. @if `p20 is 3 then `s01 is Nickabrick
  10. @if `p20 is 4 then `s01 is Selena
  11. @if `p20 is 5 then `s01 is Basil
  12. @if `p20 is 6 then `s01 is Corin
  13.  
  14. @#GETPLACE
  15. @do `s03 is `bNo`xplace?
  16. @if `p20 is 1 then `s03 is Greentree
  17. @if `p20 is 2 then `s03 is PortTown
  18. @if `p20 is 3 then `s03 is FlagCity
  19. @if `p20 is 4 then `s03 is BoneTown
  20. @if `p20 is 5 then `s03 is Sosen`xVillage
  21. @if `p20 is 6 then `s03 is Arrisville
  22.  
  23. @#GETITEM
  24. @if `p21 is 1 then `s02 is sack
  25. @if `p21 is 2 then `s02 is satchel
  26. @if `p21 is 3 then `s02 is small`xbag
  27. @if `p21 is 4 then `s02 is letter
  28. @if `p21 is 5 then `s02 is small`xpurse
  29.  
  30.  
  31. @#complete
  32. ;completes quest
  33. @routine getname
  34. @do `s05 is `s01
  35. ;current guys name is in `s05
  36.  
  37. @routine getplace
  38. ;place put in `s03
  39.  
  40. @do `p21 is `p17
  41. @routine getitem
  42. ;item put in `s02
  43.  
  44.  
  45. @show
  46. `r0`c  `r1 `%Speedy delivery! `r0
  47. `\`2  `0"Yes? Can I help you, friend?" `2asks `s05.   
  48.  
  49. `2  `$"Yeah.  Take this `s02 and pay me!"
  50.  
  51. `k  `0"I've been waiting for this!  Thank you, `%`n`0!"
  52.  
  53.   `2You are paid `$$`p16`2! 
  54.  
  55. @
  56. ;reset quest stuff
  57. ;give money
  58. @do money + `p16
  59. ;add one to quests completed var
  60. @do `p18 + 1
  61. @do `p14 is 0
  62. @do `p15 is 0
  63. @do `p16 is 0
  64. @do `p17 is 0
  65. @do `i44 is 0
  66. @do `i45 is 0
  67. @do `i46 is 0
  68. @do `i47 is 0
  69. @do `i48 is 0
  70.  
  71. @if `p32 is 0 then do
  72.   @begin
  73.  ;woah, they delivered the item same day
  74. @do `p20 random 1 1
  75. @if `p20 is 1 then do
  76.   @begin
  77.   @do `p20 random 5 1
  78.  
  79.   @if `p20 is 1 then do
  80.     @begin
  81.     @do `p08 + 1
  82.     @show
  83.   `0QUEST BONUS:  `%One extra charm point!
  84.  
  85.     @end
  86.   @if `p20 is 2 then do
  87.     @begin
  88.     @do `p03 + 3
  89.     @show
  90.   `0QUEST BONUS:  `%Three extra hitpoints!
  91.  
  92.     @end
  93.  
  94.   @if `p20 is 3 then do
  95.     @begin
  96.     @do `p04 + 1
  97.     @show
  98.   `0QUEST BONUS:  `%An extra Muscle Point!
  99.  
  100.     @end
  101.  
  102.   @if `p20 is 4 then do
  103.     @begin
  104.     @do `p05 + 1
  105.     @show
  106.   `0QUEST BONUS:  `%An extra Dodge Point!
  107.  
  108.     @end
  109.  
  110.   @if `p20 is 5 then do
  111.     @begin
  112.     @do `p19 + 1
  113.     @show
  114.   `0QUEST BONUS:  `%A free gem for your troubles!
  115.  
  116.     @end
  117.  
  118.   @end
  119.  @end
  120.  
  121. @show
  122.   `%QUEST COMPLETED.
  123. `\`k
  124. @drawmap
  125. @update
  126.  
  127. @#GETQUEST
  128. ;gets a random quest or completes it.
  129. @do `p26 is `p20
  130.  
  131. @if `p26 is `p15 then do
  132.   @begin
  133.   @run complete
  134.   @end
  135.  
  136. @label tryagain
  137. ;get destination and dest name
  138. @do `p20 random 6 1
  139.  
  140.  
  141. @do `p22 is `p20
  142. @routine GETPLACE
  143. @routine GETNAME
  144. @do `s04 is `s01
  145.  
  146. ;get name of sender
  147. @do `p20 is `p26
  148. @routine GETNAME
  149.  
  150. ;get item
  151. @do `p21 random 5 1
  152. @routine GETITEM
  153.  
  154. ;generate price for doing it
  155.  
  156. @do `p25 random 800 300
  157. @do `p24 is `p18
  158. @do `p24 * 3
  159. @do `p25 + `p24
  160.  
  161. @if `p14 = `p20 then do
  162.   @begin
  163.   @do `p21 is `p17
  164.   @routine GETITEM
  165.   @show
  166. `r0`c  `r1 `%Asking for a job `r0
  167. `\`2  `s01 `2looks suprised.  `0"What are you doing around here? Go
  168.   deliver my `s02!"
  169. `\`k
  170.   @drawmap
  171.   @update
  172.   @closescript
  173.   @end
  174.  
  175.  
  176. @if `p15 > 0 then do
  177.   @begin
  178.   @show
  179. `r0`c  `r1 `%Asking for a job `r0
  180. `\`2  You sort of already have a quest - you will need to complete that
  181.   delivery before you attempt another!
  182. `\`k
  183.   @drawmap
  184.   @update
  185.   @closescript
  186.   @end
  187.  
  188.  
  189.  
  190. @if `p31 < 1 then do
  191.   @begin
  192.   @do `p31 is 0
  193.   @show
  194. `r0`c  `r1 `%Asking for a job `r0
  195. `\`2  `0"Sorry, `%`n`0.  I have nothing for you today, maybe
  196.   tomorrow, ok?" `2`s01 tells you.
  197.  
  198. `2  (only `0`v07`2 quest opportunities per day are allowed)
  199. `\`k
  200.   @drawmap
  201.   @update
  202.   @closescript
  203.   @end
  204.  
  205. ;make sure they don't get a quest to go to where they are
  206. @if `p20 is `p22 then goto tryagain
  207.  
  208.  
  209. @do `p31 - 1
  210.  
  211.  
  212. @show
  213. `r0`c  `r1 `%Asking for a job `r0
  214.  
  215.   `0"Actually, `%`n`0.. there is something you could do."
  216.  
  217.   `2`s01 points to a `0`s02`2 sitting on the table.
  218.  
  219.   `0Would you deliver this to `#`s04`0 in `#`s03`0 for `$$`p25`0?"
  220.  
  221. @do `v01 is 1
  222. @do write
  223. `x`x
  224. @choice
  225. Yes, I accept this quest
  226. Forget it
  227. @if response is 1 then do
  228.   @begin
  229.   @do `p14 is `p20
  230.   @do `p15 is `p22
  231.   @do `p16 is `p25
  232.   @do `p17 is `p21
  233.   @if `p17 is 1 then `i44 + 1
  234.   @if `p17 is 2 then `i45 + 1
  235.   @if `p17 is 3 then `i46 + 1
  236.   @if `p17 is 4 then `i47 + 1
  237.   @if `p17 is 5 then `i48 + 1
  238.   @do `p32 is 0
  239.   @show
  240. `\`\  `2You agree to make the delivery.
  241.  
  242.   `0`s01`2 hands you the `0`s02`2!
  243.  
  244.   `%QUEST STARTED.
  245.  
  246. `k
  247.   @drawmap
  248.   @update
  249.   @end
  250.  
  251. @if response is 2 then do
  252.   @begin
  253.   @show
  254. `\`\  `0"My, but you're a picky one.  Perhaps I'll have something else for
  255.   you to do later."
  256. `\`k
  257.   @drawmap
  258.   @update
  259.   @end
  260.  
  261.  
  262.